package com.huatai.exchange.integration.base.service;

import java.io.File;
import java.io.InputStream;
import java.io.OutputStream;

import com.faneui.common.exception.BusinessException;
import org.springframework.web.bind.annotation.RequestParam;

public interface FileOperateService {

	/**
	 * 返回文件中心绝对路径
	 *
	 * @return
	 * @throws BusinessException
	 */
	String uploadFile(File... files) throws BusinessException;

	String uploadFile(InputStream... iss) throws BusinessException ;

	/**
	 * 下载文件
	 * 
	 * @param os
	 * @param fileRealPath
	 * @throws BusinessException
	 */
	void downloadFile(OutputStream os, String fileRealPath) throws BusinessException;

	/**
	 *  下载 文件
	 * @param file
	 * @param fileRealPath
	 * @throws BusinessException
	 */
	void downloadFile(File file, String fileRealPath)throws BusinessException;

	/**
	 *  压缩服务器的文件，方便复制
	 *
	 * @param filePaths
	 * @return
	 * @throws BusinessException
	 */
	String uploadZipFiles(String filePaths,String fileNames)throws BusinessException ;

	/**
	 *
	 * @param filePaths
	 * @param fileNames
	 * @param isHaveZipFile 是否可包含压缩文件  1-可，0-不可 不可的情况下 服务器自行解压，并重新压缩
	 * @return
	 * @throws BusinessException
	 */
	String uploadZipFiles(String filePaths,String fileNames,String isHaveZipFile)throws BusinessException ;

}
